<template>
  <div>
    <myswipe :imgList="list"></myswipe> 
    </mt-swipe>
    <ul class="mui-table-view mui-grid-view mui-grid-9">
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/newlist">
          <span><img src="../../images/menu3.png" alt=""></span>
          <div class="mui-media-body">新闻资讯</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/photolist">
          <span><img src="../../images/menu4.png" alt=""></span>
          <div class="mui-media-body">图片分享</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <router-link to="/home/goodslist">
          <span><img src="../../images/menu5.png" alt=""></span>
          <div class="mui-media-body">商品购买</div>
        </router-link>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span><img src="../../images/menu6.png" alt=""></span>
          <div class="mui-media-body">留言反馈</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span><img src="../../images/menu9.png" alt=""></span>
          <div class="mui-media-body">视频专区</div>
        </a>
      </li>
      <li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3">
        <a href="#">
          <span><img src="../../images/menu10.png" alt=""></span>
          <div class="mui-media-body">联系我们</div>
        </a>
      </li>
    </ul>
  </div>
</template>
<script>
  import config from "../../js/globalConfig.js";
  import myswipe from "../subcomm/myswipe.vue"
  export default {
    data() {
      return {
        list: [],
        baseUrl: config.baseUrl
      };
    },
    created() {
      this.getLun();
    },
    methods: {
      getLun() {
        this.$http.get("api/getlunbo").then(function(res) {
          if (res.body.status == 0) {
            res.body.message.forEach(item=>{
              item.img=this.baseUrl+item.img;
            })
            this.list = res.body.message;
          } else {
            console.log("获取数据失败");
          }
        });
      }
    },
    components:{myswipe}
  };
</script>
<style lang="scss" scoped>
 
  .mui-table-view {
    border: 0 !important;
    background-color: #fff !important;
    img {
      width: 60px;
    }
    li {
      background-color: #fff !important;
      border: 0 !important;
    }
  }

</style>
